using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using HengTong.Model.Db.System;


namespace HengTong.ViewModel._Admin.SysNotificationCategoryVms
{
    public partial class SysNotificationCategoryTemplateVm : BaseTemplateVM
    {
        [Display(Name = "分类名称")]
        public ExcelPropety NameExcel = ExcelPropety.CreateProperty<SysNotificationCategory>(x => x.Name);
        [Display(Name = "分类编码")]
        public ExcelPropety CodeExcel = ExcelPropety.CreateProperty<SysNotificationCategory>(x => x.Code);
        [Display(Name = "分类描述")]
        public ExcelPropety DescriptionExcel = ExcelPropety.CreateProperty<SysNotificationCategory>(x => x.Description);
        [Display(Name = "分类图标")]
        public ExcelPropety IconExcel = ExcelPropety.CreateProperty<SysNotificationCategory>(x => x.Icon);
        [Display(Name = "启用站内信")]
        public ExcelPropety EnableInternalMessageExcel = ExcelPropety.CreateProperty<SysNotificationCategory>(x => x.EnableInternalMessage);
        [Display(Name = "启用短信")]
        public ExcelPropety EnableSmsExcel = ExcelPropety.CreateProperty<SysNotificationCategory>(x => x.EnableSms);
        [Display(Name = "启用邮件")]
        public ExcelPropety EnableEmailExcel = ExcelPropety.CreateProperty<SysNotificationCategory>(x => x.EnableEmail);
        [Display(Name = "启用APP推送")]
        public ExcelPropety EnableAppPushExcel = ExcelPropety.CreateProperty<SysNotificationCategory>(x => x.EnableAppPush);
        [Display(Name = "启用微信推送")]
        public ExcelPropety EnableWechatPushExcel = ExcelPropety.CreateProperty<SysNotificationCategory>(x => x.EnableWechatPush);
        [Display(Name = "启用钉钉推送")]
        public ExcelPropety EnableDingTalkPushExcel = ExcelPropety.CreateProperty<SysNotificationCategory>(x => x.EnableDingTalkPush);
        [Display(Name = "默认优先级")]
        public ExcelPropety DefaultPriorityExcel = ExcelPropety.CreateProperty<SysNotificationCategory>(x => x.DefaultPriority);
        [Display(Name = "是否启用")]
        public ExcelPropety IsEnabledExcel = ExcelPropety.CreateProperty<SysNotificationCategory>(x => x.IsEnabled);
        [Display(Name = "排序号")]
        public ExcelPropety SortOrderExcel = ExcelPropety.CreateProperty<SysNotificationCategory>(x => x.SortOrder);
        [Display(Name = "_Admin.Parent")]
        public ExcelPropety ParentExcel = ExcelPropety.CreateProperty<SysNotificationCategory>(x => x.ParentId);

	    protected override void InitVM()
        {
            ParentExcel.DataType = ColumnDataType.ComboBox;
            ParentExcel.ListItems = DC.Set<SysNotificationCategory>().GetSelectListItems(Wtm, y => y.Name);
        }

    }

    public class SysNotificationCategoryImportVm : BaseImportVM<SysNotificationCategoryTemplateVm, SysNotificationCategory>
    {

    }

}
